import Lable from "./Lable";
import Node from "./Node";
import Sprite from "./Sprite";


export class Item_base {
    uuid: string = '1';
    name: string = 'Sprite';
    display: boolean = true;
    x: number = 0;
    y: number = 0;
    _x: number = 0;
    _y: number = 0;
    canvans: Node;
    child: any[] = []
    parent: any = undefined;
    constructor(canvans: Node) {
        this.canvans = canvans;
    }
    /**
* 增加文字
*/
    addLable() {
        // item.canvans = this.canvans;
        // // let items = new Lable(this.canvans);
        // item.parent = this;
        // this.child.push(item);
        // return item;
    }
    /**
     * 增加图片元素
     */
    addSprite() {
        let item = new Sprite(this.canvans);
        item.parent = this;
        this.child.push(item);
        return item;
    }

    draw() {

    }
}